﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.Infra.UI.Common;
using Sinacor.Infra.Common;

namespace Sinacor.UI.Bovespa.Ordens.Communication.Translator
{
    public class ObservacaoToModel : BaseTranslator<Model.Observacao, Bovespa.Ordens.Ordem.ObservacaoResponse,
                                        List<Model.Observacao>, List<Bovespa.Ordens.Ordem.ObservacaoResponse>>
    {
        public override Sinacor.UI.Bovespa.Ordens.Model.Observacao Translate(Sinacor.UI.Bovespa.Ordens.Communication.Bovespa.Ordens.Ordem.ObservacaoResponse from)
        {
            if(from == null){
                return null;
            }
            
            Model.Observacao to = new Sinacor.UI.Bovespa.Ordens.Model.Observacao();
            
            to.CodigoCliente = from.CodigoCliente;
            to.DataPregao = from.DataPregao;
            to.Descricao = from.Descricao;
            to.NumeroOrdem = from.NumeroOrdem;
            
            return to;
        }
    }
}
